<?php
registerTable("user_profile", new table_user_profile());

class table_user_profile extends Database
{

    public function __construct()
    {
        parent::__construct("user_profile");
    }

    public function insert_data($profile)
    {
        return parent::insert($profile);
    }

    public function fetch_all_by_name($name)
    {
        $res = parent::fetch_assoc("`name`='$name'", "*");
        if (parent::isEmpty())
            return - 1;
        return $res;
    }
}
?>